//osc = BWE object string chunk text format.
#ifndef _READWRITE_OBC_H_
#define _READWRITE_OBC_H_

#include <BMap>
#include <BStream>
#include <BNode>
#include <BLight>
#include <BCamera>
#include <BScene>
#include <BMesh>
#include <BGeometry>
#include <BMesh>
#include <BCone>
#include <BCube>
#include <BCylinder>
#include <BSphere>
#include <BTorus>
#include <BSurface>

#include <BImage>
#include <BFont>
#include <BPixmap>
#include <BMaterial>
#include <BTexture>
#include <BProgram>
#include <BShader>
#include <BUniform>

#include "OscDocument.h"
#include <BReadWrite>

using namespace BWE;

class ReadWrite_osc : public BReadWrite
{
public:
	ReadWrite_osc();
	~ReadWrite_osc();

	virtual void setOptions(const BString& options) override;
	virtual const BString& options() const override;

	virtual BObject* load(const BString& fileName) override;
	virtual bool load(const BString& fileName, BObject* object) override;
	virtual bool save(const BString& fileName, const BObject* object) const override;

	virtual BObject* read(const BBuffer& buffer) override;
	virtual bool read(const BBuffer& buffer, BObject* object) override;
	virtual bool write(BBuffer& buffer, const BObject* object) const override;

	virtual const BString& author() const;
	virtual const BString& version() const;
	virtual const BString& description() const;
	virtual const BString& message() const;

private:
	BString			_author;
	BString			_version;
	BString			_description;
	BString			_message;
	BString			_options;
	BString			_log;

	BString			_filePath;
	OscDocument		_document;
};

#endif